package com.yanqu.road.entity.monopolymarket.fortress;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description 玩家要塞信息
 * @Author cwq
 * @Data 2021/10/14 11:12
 */
@FieldTypeAnnotation(tableName = "t_c_monopolymarket_fortress_user")
public class MonopolyMarketFortressUserData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true,desc = "分组id")
    private long groupId;
    @FieldTypeAnnotation(select = true, update = true,desc = "周id")
    private int weekId;
    @FieldTypeAnnotation(select = true, update = true,desc = "玩家id")
    private long userId;
    @FieldTypeAnnotation(desc = "玩家所属联盟")
    private String unionId="";
    @FieldTypeAnnotation(desc = "已领取的要塞奖励id")
    private List<Integer> receivedIdList = new ArrayList<>();
    @FieldTypeAnnotation(desc = "门客所在的要塞 k:要塞id,v:派遣的集合 ")
    private Map<Integer, List<MonopolyMarketFortressPatronsDispatchInfo>> dispatchMap = new HashMap<>();

    /**
     * 每个门客对应要塞id  k:门客id v:要塞id
     */
    public Map<Integer,Integer> dispatchCityMap = new HashMap<>();

    public long getGroupId() {
        return groupId;
    }
    public void setGroupId(long groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public int getWeekId() {
        return weekId;
    }
    public void setWeekId(int weekId) {
        if (this.weekId != weekId) {
            this.weekId = weekId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }
    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }

    public String getUnionId() {
        return unionId;
    }
    public void setUnionId(String unionId) {
        if (unionId == null){
            return;
        }
        if (this.unionId == null || !this.unionId.equals(unionId)) {
            this.unionId = unionId;
            setOp(DataStatus.Update);
        }
    }

    public java.util.List<java.lang.Integer> getReceivedIdList() {
        return receivedIdList;
    }
    public void setReceivedIdList(java.util.List<java.lang.Integer> receivedIdList) {
        if (null == receivedIdList){
            return;
        }
        if (this.receivedIdList == null || !this.receivedIdList.equals(receivedIdList)) {
            this.receivedIdList = receivedIdList;
            setOp(DataStatus.Update);
        }
    }

    public Map<Integer, List<MonopolyMarketFortressPatronsDispatchInfo>> getDispatchMap() {
        return dispatchMap;
    }
    public void setDispatchMap(Map<Integer, List<MonopolyMarketFortressPatronsDispatchInfo>> dispatchMap) {
        if (null == dispatchMap){
            return;
        }
        if (this.dispatchMap == null || !this.dispatchMap.equals(dispatchMap)) {
            this.dispatchMap = dispatchMap;
            setOp(DataStatus.Update);
        }
    }
}
